home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5397 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: mozart.unx.sas.com!sassek
  3. From: sassek@unx.sas.com (Steve Krueger)
  4. Subject: Re: Ceck out this bug. What the *** is SASC/6.56 doing?
  5. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  6. Message-ID: <sassek.826742736@sas.com>
  7. Date: Wed, 13 Mar 1996 18:45:36 GMT
  8. X-Nntp-Posting-Host: wonka.unx.sas.com
  9. References: <1120.6643T91T406@login.eunet.no> <sassek.826554207@sas.com> <422.6645T351T2154@login.eunet.no>
  10. Organization: SAS Institute Inc.
  11.  
  12. patrick.hanevold@login.eunet.no (Patrick Hanevold) writes:
  13.  
  14.  
  15. >>You are probably running out of stack. With a standard 4k stack,
  16. >>after the prolog of main(), you only have 640 bytes of stack left.
  17. >>Apparently not enough for OpenScreenTags(). The program runs
  18. >>fine with a 20k stack.
  19.  
  20. >Guess stack check is bugged then. Hmm.. maby it doesnt work on SC's own
  21. >code.
  22.  
  23. No, stack checking is working fine. The prolog code for main()
  24. determines that there is enough stack for main() to run. This
  25. is correct. OpenScreenTags() is a system routine that does not
  26. do stack checking. If you run out of stack while inside a 
  27. a system routine, your program cannot detect it.
  28.  
  29. One way around this kind of problem is to compile with STACKEXT,
  30. and then set the global variable __STKNEED to 4k or something similar.
  31. Then your program will get more stack anytime you have less than 4k
  32. stack available. BTW the default value for __STKNEED is only 400 bytes,
  33. which is too small for many applications.
  34.  
  35. sk
  36.